#include <ledParamTables.h>
/* Efficiency is 1024 @25C , the value is 990*1024/1000 when efficiency is 99.0% 

Based on the following rgb current measurement
RED=30mA,GREEN=30mA,BLUE=30mA

*/ 
static const TempParams_t TEMP_CURVE_TABLE_RED[TEMP_CMP_NUM_MAX] = 
{
    /*T(1C) efficiency deltaV(mV) x(%), y(%) */
/*0*/{1235U,50,1020U,1032U},
/*2*/{1217U,43,1020U,1031U},
/*4*/{1200U,37,1021U,1030U},
/*6*/{1182U,34,1021U,1030U},
/*8*/{1164U,28,1021U,1029U},
/*10*/{1147U,25,1021U,1028U},
/*12*/{1129U,19,1022U,1028U},
/*14*/{1112U,17,1022U,1027U},
/*16*/{1094U,14,1022U,1026U},
/*18*/{1076U,11,1023U,1026U},
/*20*/{1059U,8,1023U,1025U},
/*22*/{1041U,3,1023U,1024U},
/*24*/{1024U,0,1024U,1024U},
/*26*/{1006U,-3,1024U,1023U},
/*28*/{988U,-5,1024U,1022U},
/*30*/{971U,-7,1024U,1021U},
/*32*/{953U,-13,1025U,1021U},
/*34*/{935U,-15,1025U,1020U},
/*36*/{918U,-19,1025U,1019U},
/*38*/{900U,-23,1026U,1019U},
/*40*/{883U,-26,1026U,1018U},
/*42*/{867U,-30,1026U,1017U},
/*44*/{858U,-35,1026U,1017U},
/*46*/{849U,-37,1027U,1016U},
/*48*/{840U,-38,1027U,1016U},
/*50*/{831U,-41,1027U,1015U},
/*52*/{823U,-44,1027U,1015U},
/*54*/{814U,-47,1027U,1015U},
/*56*/{805U,-50,1027U,1014U},
/*58*/{796U,-52,1028U,1014U},
/*60*/{787U,-56,1028U,1014U},
/*62*/{779U,-60,1028U,1013U},
/*64*/{770U,-63,1028U,1013U},
/*66*/{762U,-65,1028U,1012U},
/*68*/{743U,-67,1028U,1012U},
/*70*/{725U,-71,1029U,1011U},
/*72*/{706U,-74,1029U,1011U},
/*74*/{706U,-77,1029U,1010U},
/*76*/{688U,-80,1029U,1010U},
/*78*/{670U,-84,1029U,1010U},
/*80*/{662U,-85,1029U,1009U},
/*82*/{658U,-89,1029U,1009U},
/*84*/{654U,-91,1029U,1009U},
/*86*/{651U,-93,1030U,1008U},
/*88*/{647U,-95,1030U,1008U},
/*90*/{631U,-99,1030U,1007U},
/*92*/{616U,-101,1030U,1007U},
/*94*/{596U,-103,1030U,1007U},
/*96*/{576U,-107,1030U,1006U},
/*98*/{557U,-113,1030U,1006U},
/*100*/{553U,-120,1030U,1006U},
/*102*/{549U,-125,1030U,1006U},
/*104*/{545U,-126,1030U,1005U},
/*106*/{542U,-130,1030U,1005U},
/*108*/{538U,-132,1030U,1005U},
/*110*/{535U,-134,1030U,1005U},
/*112*/{532U,-138,1030U,1005U},
/*114*/{529U,-138,1031U,1005U},
/*116*/{525U,-140,1031U,1004U},
/*118*/{522U,-142,1031U,1004U},
/*120*/{519U,-146,1031U,1004U},



};

static const TempParams_t TEMP_CURVE_TABLE_GREEN[TEMP_CMP_NUM_MAX] = 
{
/*0*/{1056U,34,938U,1035U},
/*2*/{1053U,30,945U,1034U},
/*4*/{1050U,28,952U,1033U},
/*6*/{1048U,23,959U,1032U},
/*8*/{1045U,21,966U,1031U},
/*10*/{1042U,19,974U,1030U},
/*12*/{1040U,16,981U,1029U},
/*14*/{1037U,14,988U,1028U},
/*16*/{1034U,11,995U,1027U},
/*18*/{1032U,7,1002U,1026U},
/*20*/{1029U,5,1009U,1025U},
/*22*/{1026U,3,1016U,1024U},
/*24*/{1024U,0,1024U,1024U},
/*26*/{1021U,-1,1031U,1023U},
/*28*/{1018U,-3,1038U,1022U},
/*30*/{1015U,-7,1045U,1021U},
/*32*/{1013U,-10,1052U,1020U},
/*34*/{1010U,-13,1059U,1019U},
/*36*/{1007U,-17,1066U,1018U},
/*38*/{1005U,-22,1073U,1017U},
/*40*/{1002U,-26,1081U,1016U},
/*42*/{999U,-28,1088U,1015U},
/*44*/{997U,-31,1095U,1014U},
/*46*/{994U,-33,1102U,1013U},
/*48*/{991U,-36,1109U,1012U},
/*50*/{989U,-37,1116U,1011U},
/*52*/{986U,-38,1123U,1010U},
/*54*/{982U,-42,1132U,1009U},
/*56*/{980U,-44,1136U,1008U},
/*58*/{979U,-46,1139U,1008U},
/*60*/{977U,-48,1143U,1007U},
/*62*/{975U,-50,1146U,1007U},
/*64*/{973U,-51,1150U,1006U},
/*66*/{971U,-52,1156U,1005U},
/*68*/{969U,-55,1161U,1005U},
/*70*/{967U,-57,1165U,1004U},
/*72*/{965U,-59,1169U,1004U},
/*74*/{963U,-60,1173U,1003U},
/*76*/{961U,-63,1178U,1003U},
/*78*/{959U,-65,1182U,1002U},
/*80*/{957U,-68,1186U,1002U},
/*82*/{955U,-70,1191U,1001U},
/*84*/{953U,-72,1195U,1001U},
/*86*/{952U,-75,1198U,1000U},
/*88*/{948U,-76,1208U,998U},
/*90*/{943U,-79,1217U,997U},
/*92*/{941U,-81,1222U,997U},
/*94*/{940U,-83,1227U,996U},
/*96*/{938U,-85,1232U,995U},
/*98*/{936U,-87,1237U,995U},
/*100*/{935U,-89,1242U,994U},
/*102*/{933U,-91,1247U,993U},
/*104*/{931U,-92,1252U,993U},
/*106*/{927U,-95,1254U,992U},
/*108*/{922U,-97,1263U,991U},
/*110*/{918U,-98,1274U,990U},
/*112*/{914U,-100,1283U,989U},
/*114*/{909U,-100,1294U,987U},
/*116*/{904U,-102,1303U,986U},
/*118*/{899U,-104,1313U,985U},
/*120*/{895U,-107,1322U,984U},


};

static const TempParams_t TEMP_CURVE_TABLE_BLUE[TEMP_CMP_NUM_MAX] = 
{
    /*T(1C) efficiency deltaV(mV) x(%), y(%) */
/*0*/{981U,35,1031U,965U},
/*2*/{984U,31,1031U,970U},
/*4*/{988U,29,1030U,975U},
/*6*/{992U,25,1029U,980U},
/*8*/{995U,22,1029U,984U},
/*10*/{999U,19,1028U,989U},
/*12*/{1002U,16,1027U,994U},
/*14*/{1006U,14,1027U,999U},
/*16*/{1009U,10,1026U,1004U},
/*18*/{1013U,7,1025U,1009U},
/*20*/{1016U,4,1025U,1014U},
/*22*/{1020U,2,1024U,1019U},
/*24*/{1024U,0,1024U,1024U},
/*26*/{1027U,-2,1023U,1028U},
/*28*/{1031U,-4,1022U,1033U},
/*30*/{1034U,-7,1022U,1038U},
/*32*/{1038U,-10,1021U,1043U},
/*34*/{1041U,-13,1020U,1048U},
/*36*/{1045U,-17,1020U,1053U},
/*38*/{1048U,-21,1019U,1058U},
/*40*/{1052U,-25,1018U,1063U},
/*42*/{1055U,-29,1018U,1067U},
/*44*/{1063U,-32,1017U,1072U},
/*46*/{1067U,-35,1016U,1077U},
/*48*/{1071U,-38,1015U,1082U},
/*50*/{1077U,-40,1015U,1087U},
/*52*/{1080U,-43,1014U,1092U},
/*54*/{1082U,-46,1014U,1097U},
/*56*/{1084U,-49,1013U,1102U},
/*58*/{1085U,-51,1012U,1106U},
/*60*/{1087U,-52,1012U,1111U},
/*62*/{1088U,-56,1012U,1116U},
/*64*/{1090U,-58,1012U,1121U},
/*66*/{1091U,-60,1011U,1126U},
/*68*/{1093U,-62,1011U,1131U},
/*70*/{1094U,-64,1010U,1136U},
/*72*/{1096U,-68,1010U,1141U},
/*74*/{1097U,-71,1010U,1145U},
/*76*/{1099U,-74,1009U,1150U},
/*78*/{1100U,-77,1009U,1155U},
/*80*/{1102U,-79,1008U,1165U},
/*82*/{1103U,-82,1007U,1170U},
/*84*/{1104U,-85,1007U,1175U},
/*86*/{1104U,-88,1006U,1180U},
/*88*/{1104U,-89,1005U,1184U},
/*90*/{1105U,-94,1005U,1189U},
/*92*/{1105U,-97,1004U,1194U},
/*94*/{1107U,-99,1003U,1199U},
/*96*/{1108U,-102,1003U,1204U},
/*98*/{1108U,-104,1002U,1214U},
/*100*/{1107U,-105,1001U,1223U},
/*102*/{1107U,-107,1001U,1233U},
/*104*/{1104U,-111,1000U,1243U},
/*106*/{1102U,-113,999U,1253U},
/*108*/{1099U,-116,999U,1262U},
/*110*/{1096U,-118,998U,1272U},
/*112*/{1094U,-123,997U,1282U},
/*114*/{1091U,-125,997U,1292U},
/*116*/{1088U,-129,996U,1301U},
/*118*/{1085U,-134,995U,1311U},
/*120*/{1083U,-136,995U,1321U},


};


TempParams_t const * LP_GetTempTableRed(LedNum_t ledIndex)
{
    return TEMP_CURVE_TABLE_RED;
}

TempParams_t const * LP_GetTempTableGreen(LedNum_t ledIndex)
{
    return TEMP_CURVE_TABLE_GREEN;
}

TempParams_t const * LP_GetTempTableBlue(LedNum_t ledIndex)
{
    return TEMP_CURVE_TABLE_BLUE;
}



/*
const AccurateColorXYY_t calibratedColortable[] = 
{
  {21845, 21845, 100, 255,255,255},
  {X0, Y0, 100, 254,254,255},
};
*/



